import java.awt.Color;
import java.awt.Graphics;
import java.awt.Rectangle;
import java.util.Random;

public class Blood {
	private int x;
	private int y;
	private boolean live = false;

	public static final int WIDTH = 10;
	public static final int HEIGHT = 10;

	Random r = new Random();

	public Blood() {
		x = r.nextInt(800);
		y = r.nextInt(570) + 30;
	}

	public boolean isLive() {
		return live;
	}

	public void setLive(boolean live) {
		this.live = live;
	}

	public void draw(Graphics g) {
		// TODO Auto-generated method stub
		if (r.nextInt(800) > 798)
			this.live = true;
		if (!live)
			return;
		Color c = g.getColor();
		g.setColor(Color.MAGENTA);
		g.fillRect(x, y, WIDTH, HEIGHT);
		g.setColor(c);
	}

	public Rectangle getRect() {
		return new Rectangle(x, y, WIDTH, HEIGHT);
	}
}
